<template>
  <div class="content">
    <h2 class="title">热门精选</h2>
    <div class="list">
      <template v-for="(item, index) in houselist" :key="item.data.houseId">
        <house-item-v9 
          v-if="item.discoveryContentType === 9" 
          :item-data="item.data">
        </house-item-v9>
        <house-item-v3 
          v-else-if="item.discoveryContentType === 3"
          :item-data="item.data"
          >
        </house-item-v3>
      </template>
    </div>
  </div>
</template>

<script setup>
import houseItemV9 from '@/components/home-item-v9/home-item-v9.vue'
import houseItemV3 from '@/components/home-item-v3/home-item-v3.vue'
import useHomeStore from '@/store/modules/home'
import { storeToRefs } from 'pinia'

const homeStore = useHomeStore()
const { houselist } = storeToRefs(homeStore)


</script>

<style lang="less" scoped>
.content{
  padding: 10px 5px;
  .title {
    font-size: 22px;
    padding: 10px;
  }
  .list {
    display: flex;
    flex-wrap: wrap;
  }

}
</style>
